const HtmlWebpackPlugin = require("html-webpack-plugin");
const path = require("path");
module.exports = {
  entry: path.resolve(__dirname, "src/index.js"),
  output: {
    path: path.resolve(__dirname, "dist"),
    filename: "scripts/bundle.js",
    clean: true,
  },
  devServer: {
    static: path.resolve(__dirname, "dist"),
    port: 3000,
    proxy: [
      {
        context: ["/api"],
        target: "http://localhost:9000",
      },
    ],
  },
  plugins: [new HtmlWebpackPlugin()],
};
